package cn.anlaser.utils;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

public class MyAuthenticator extends Authenticator{   
    String _userName=null;   
    char[] _password=null;   
        
    public MyAuthenticator(){   
    }   
    public MyAuthenticator(String username, String password) {    
      this._userName = username;    
      this._password = password.toCharArray();    
    }    
    protected PasswordAuthentication getPasswordAuthentication(){   
      return new PasswordAuthentication(_userName, _password);   
    }   
}  